export interface Workspace {
    id: string
    name: string
    userId: string,
    joinCode: string
}

export enum Role {
    "ADMIN" = "admin",
    "MEMBER" = 'member'
}

export interface Member {
    id: string
    userId: string
    workspaceId: string
    role: Role
}

export interface Channel {
    id: string
    name: string
    workspaceId: string
}

export interface Message {
    id: string
    body: string
    image?: string // url or base64
    memberId: string
    workspaceId: string
    channelId?: string
    parentMessageId?: string
    conversationId?: string
    updatedAt?: number // timestamp
    createdAt?: number
    threadCount?: number
    threadImage?: string
    threadTimestamp?: number
    // threadTimestamp?: string
    reactions?: {
        id: string
        count: number
        memberIds: string[]
        value: string
        // createdAt?: number
    }[]
}

export interface Conversation {
    id: string
    memberOneId: string
    memberTwoId: string
    workspaceId: string
}